package com.quectel.core.module.devicepatrol.dto;

import com.quectel.core.module.device.dto.DeviceDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author caolu
 * @email louis.cao@quectel.com
 * @date 2022/05/07 14:07
 */
@Data
@Schema
public class DevicePatrolRouteDto implements Serializable {

    /**
     *
     */
    @Schema(description = "")
    private Long id;

    /**
     *
     */
    @Schema(description = "")
    private Long tenantId;

    /**
     * 所属小区
     */
    @Schema(description = "所属小区")
    @NotNull
    private Long villageId;

    /**
     * 路线名称
     */
    @Schema(description = "路线名称")
    @NotEmpty
    @Length(min = 1, max = 80)
    private String name;

    /**
     * 创建人
     */
    @Schema(description = "创建人")
    private String creator;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 修改人
     */
    @Schema(description = "修改人")
    private String editor;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private Date editTime;

    /************非数据库字段 start ************/

    /**
     * 园区Dto
     */
    @Schema(description = "园区信息")
    private String villageName;

    /**
     * 关联设备数量
     */
    @Schema(description = "关联设备数量")
    private Integer relatedDeviceNum;

    /**
     * 关联设备
     */
    @Schema(description = "关联设备")
    private List<DevicePatrolRouteDeviceDto> devicePatrolRouteDeviceDtos;

    /**
     * 关联设备详情
     */
    @Schema(description = "关联设备详情")
    private List<DeviceDto> relatedDevices;


    /************非数据库字段 end **************/
}
